import React from 'react'
import usePosition from '../hook/usePositon'

export default function Son1() {
  let { x, y } = usePosition()
  return (
    <div>
      <div
        style={{
          position: 'absolute',
          transform: `translate(${x - 110}px,${y - 110}px)`,
          transition: 'all 1s',
          background: 'red',
          border: '2px solid black',
          width: 100,
          height: 100,
        }}
      ></div>
    </div>
  )
}
